<?php

/**
 * EntityId form.
 *
 * @package    form
 * @subpackage EntityId
 * @version    SVN: $Id: sfPropelFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class PluginEntityIdForm extends BaseEntityIdForm
{
  public function setup()
  {
    parent::setup();
    unset($this['version']);
    
    $this->widgetSchema['entity_uid'] = new sfWidgetFormDoctrineChoice(array('model' => 'Entity'));
    $this->widgetSchema['type_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'EntityIdTypeCd'));
    $this->widgetSchema['created_reason_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'EntityIdCreatedReasonCd'));
    $this->widgetSchema['updated_reason_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'EntityIdUpdatedReasonCd'));
    $this->widgetSchema['assigning_authority_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'AssigningAuthorityCd'));
    $this->widgetSchema['duration_unit_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'DurationUnitCd'));
    $this->widgetSchema['status_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'EntityStatusCd'));
    $this->widgetSchema['record_status_cd'] = new sfWidgetFormDoctrineChoice(array('model' => 'EntityRecordStatusCd'));
    
    $this->validatorSchema['entity_uid'] = new sfValidatorDoctrineChoice(
        array('model' => 'Entity', 'column' => 'entity_uid', 'required' => false));
    $this->validatorSchema['type_cd'] = new sfValidatorDoctrineChoice(
        array('model' => 'EntityIdTypeCd', 'column' => 'code', 'required' => false));
  }
}
